package com.hspedu.try_;

public class StringBuffer01 {
    public static void main(String[] args) {
//        String s = "hello";
//        StringBuffer stringBuffer = new StringBuffer(s);
//        String s1 = new String(stringBuffer);
//        System.out.println(s1);
//        StringBuffer s = new StringBuffer("hello");
//        s.append("hsifi");
//        s.append(0).append("jiji").append(true);
//        System.out.println(s);

        StringBuffer stringBuffer = new StringBuffer();
//        stringBuffer.delete(1,10);
//        System.out.println(stringBuffer);

//        try {
//            stringBuffer.replace(3,6,"high");
//            System.out.println(stringBuffer);
//        } catch (Exception e) {
//            System.out.println(e.getMessage());
//        }
//         int index = stringBuffer.indexOf("low");
//        System.out.println(index);

//        stringBuffer.insert(2,"hhhh");
//        System.out.println(stringBuffer);
//        System.out.println(stringBuffer.length());
        String str = null;
        stringBuffer.append(str);
        System.out.println(stringBuffer.length());
    }
}
